<template>
  <div>
    <div style="width: 100%;margin: 0 auto;" align="center">
      <el-tabs v-model="activeName" type="border-card" style="min-height: calc(100vh - 225px);" @tab-click="handleClick">
        <el-tab-pane label="传统方式" name="first">
          <Tradition v-if="isFirst" />
        </el-tab-pane>
        <el-tab-pane label="项目方式" name="second">
          <Project v-if="isSecond" />
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>
<script>
import Tradition from './tradition';
import Project from './project';
export default {
  name: 'IntegralSetting',
  components: {
    Tradition,
    Project
  },
  data() {
    return {
      activeName: 'first',
      isFirst: true,
      isSecond: false
    };
  },
  created() {
  },
  methods: {
    handleClick(tab) {
      if (tab.name === 'first') {
        this.isFirst = true;
        this.isSecond = false;
      } else if (tab.name === 'second') {
        this.isFirst = false;
        this.isSecond = true;
      }
    }
  }
};
</script>
